import Vue from "vue";
import App from "./App.vue";
import store from "./store/index.js";
// ajax请求
import axios from "@/router/axios";
import VueAxios from "vue-axios";

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import Avue from "@smallwei/avue";
import "@smallwei/avue/lib/index.css";
import UI from "@/components/ui/index.js"; // ui库
import "@/styles/index.less"; // 全局样式
import basicContainer from "./components/basic-container/main";

import ElementDataset from "element-dataset"; // 兼容ie9的dataset属性
import Icon from "@/components/portalIcon";

/*
 * 为了避免打包后的样式部分无效，将router引用放到最后
 */
import "./router/permission.js"; // 路由全局钩子
import router from "./router/router.js";

// 注册echarts
import echarts from "echarts";
Vue.prototype.$echarts = echarts;

ElementDataset();
Vue.use(VueAxios, axios);
Vue.use(ElementUI);
Vue.use(Avue);
Vue.use(UI);
Vue.component("basicContainer", basicContainer);
Vue.component("Icon", Icon);
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
